FROM node:22.16-alpine AS builder
WORKDIR /app
COPY package*.json ./
COPY vite.config.js ./
RUN npm ci
COPY . .
RUN npm run build

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html